﻿using Orchard.UI.Resources;

namespace NineSeas
{
    public class ResourceManifest : IResourceManifestProvider
    {
        public void BuildManifests(ResourceManifestBuilder builder)
        {
            // Create and add a new manifest
            var manifest = builder.Add();

            // Define an "Authoring" style sheet
            manifest.DefineStyle("NineSeas.Common").SetUrl("common.min.css", "common.css").SetVersion("0.9");
            manifest.DefineStyle("FancyBox").SetUrl("jquery.fancybox.min.css", "jquery.fancybox.css").SetVersion("0.9");
            manifest.DefineStyle("jQuery_Ias").SetUrl("jquery.ias.min.css", "jquery.ias.css").SetVersion("0.1.6");

            manifest.DefineStyle("NineSeas.Home").SetUrl("home.min.css", "home.css").SetVersion("0.9");

            manifest.DefineStyle("NineSeas.Reader").SetUrl("reader.min.css", "reader.css").SetVersion("0.9");

            manifest.DefineStyle("NineSeas.Book.View").SetUrl("book.view.min.css", "book.view.css").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.Book.ChapterDropDown").SetUrl("book.chapter-dropdown.min.css", "book.chapter-dropdown.css").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.Book.Chapters").SetUrl("book.chapters.min.css", "book.chapters.css").SetDependencies("NineSeas.Common").SetVersion("0.9");

            manifest.DefineStyle("NineSeas.Authoring").SetUrl("authoring.min.css", "authoring.css").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.Authoring.Books").SetUrl("authoring.books.min.css", "authoring.books.css").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.Authoring.Book.Edit").SetUrl("authoring.book.edit.min.css", "authoring.book.edit.css").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.Authoring.Book.Chapter.Edit").SetUrl("authoring.book.editchapter.min.css", "authoring.book.editchapter.css").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.ColorPicker").SetUrl("colorpicker.min.css", "colorpicker.css").SetVersion("0.9");

            manifest.DefineStyle("NineSeas.Authors").SetUrl("authors.min.css", "authors.css").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.Authors.Author.Details").SetUrl("authors.author.details.min.css", "authors.author.details.css").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.CategorySelector").SetUrl("categorySelector.min.css", "categorySelector.css").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.CategoryMenu").SetUrl("categoryMenu.min.css", "categoryMenu.css").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.HelpPopup").SetUrl("help-popup.min.css", "help-popup.css").SetVersion("0.9");
            manifest.DefineStyle("NineSeas.SharePanel").SetUrl("share-panel.min.css", "share-panel.css").SetVersion("0.9");

            // book view list
            manifest.DefineStyle("NineSeas.BookView.List").SetUrl("bookview.list.min.css", "bookview.list.css").SetDependencies("NineSeas.Common").SetVersion("0.9");

            // admin
            manifest.DefineStyle("NineSeas.Books.Summary").SetUrl("books.summary.min.css", "books.summary.css").SetVersion("0.9");

            // scripts
            manifest.DefineScript("FancyBox").SetUrl("jquery.fancybox.min.js", "jquery.fancybox.js").SetDependencies("jQuery");
            manifest.DefineScript("MovingBox").SetUrl("jquery.movingboxes.min.js").SetDependencies("jQuery");
            manifest.DefineScript("jQuery_Ias").SetUrl("jquery.ias.min.js", "jquery.ias.js").SetVersion("0.1.6").SetDependencies("jQuery");
            manifest.DefineScript("NineSeas.Home").SetUrl("home.min.js", "home.js").SetDependencies("jQuery").SetVersion("0.9");

            manifest.DefineScript("FriendUrl").SetUrl("jquery.friendurl.min.js", "jquery.friendurl.js").SetDependencies("jQuery");
            manifest.DefineScript("NineSeas.Common").SetUrl("common.min.js", "common.js").SetDependencies("jQueryUI_Dialog").SetVersion("0.9");
            manifest.DefineScript("NineSeas.Authoring.Book.Edit").SetUrl("authoring.book.edit.min.js", "authoring.book.edit.js").SetDependencies("FriendUrl").SetVersion("0.9");
            manifest.DefineScript("NineSeas.InplaceMessage").SetUrl("inplaceMessage.min.js", "inplaceMessage.js").SetDependencies("jQueryUI_Core", "jQueryUI_Widget").SetVersion("0.9");
            manifest.DefineScript("NineSeas.MediaUploadButton").SetUrl("mediaUploadButton.min.js", "mediaUploadButton.js").SetDependencies("jQueryUI_Core", "jQueryUI_Widget").SetVersion("0.9");
            manifest.DefineScript("NineSeas.CommandBar").SetUrl("commandBar.min.js", "commandBar.js").SetDependencies("jQueryUI_Core", "jQueryUI_Widget").SetVersion("0.9");
            manifest.DefineScript("NineSeas.Book.Pager").SetUrl("book.pager.min.js", "book.pager.js").SetDependencies("NineSeas.CommandBar").SetVersion("0.9");
            manifest.DefineScript("NineSeas.Authoring").SetUrl("authoring.min.js", "authoring.js").SetDependencies("NineSeas.Common").SetVersion("0.9");
            manifest.DefineScript("NineSeas.Authors.Author.Details").SetUrl("authors.author.details.min.js", "authors.author.details.js").SetDependencies("jQuery", "NineSeas.PopupPanel").SetVersion("0.9");
            manifest.DefineScript("NineSeas.ColorPicker").SetUrl("colorpicker.min.js", "colorpicker.js").SetDependencies("NineSeas.Common", "jQueryUI_Widget").SetVersion("0.9");
            manifest.DefineScript("NineSeas.CategorySelector").SetUrl("categorySelector.min.js", "categorySelector.js").SetDependencies("jQuery").SetVersion("0.9");
            manifest.DefineScript("NineSeas.HelpPopup").SetUrl("help-popup.min.js", "help-popup.js").SetDependencies("jQuery").SetVersion("0.9");
            manifest.DefineScript("NineSeas.PopupPanel").SetUrl("popupPanel.min.js", "popupPanel.js").SetDependencies("jQuery").SetVersion("0.9");
            manifest.DefineScript("NineSeas.Reader").SetUrl("reader.min.js", "reader.js").SetDependencies("jQuery", "NineSeas.PopupPanel").SetVersion("0.9");

            manifest.DefineScript("jQueryTools").SetUrl("jquery.tools.min.js").SetDependencies("jQuery");
        }
    }
}